<template>
	<view class="squareItem" @click="tosquare">
		<image lazy-load mode="aspectFill" class="squareImg" :src="datas.logo"></image>
		<view class="squareText">
			<view class="flex align-center justify-between">
				<view style="font-size: 24upx;" class="nodetext">{{datas.name}}</view>
				<text style="color: #ff5f55;font-size: 24upx;">{{datas.distance}}</text>
			</view>
			<view class="flex align-center" style="margin-top: 10upx;">
				<image class="squareAddress" src="/static/image/WB/address.png"></image>
				<view style="font-size: 24upx;color: #aaa;margin-left: 6upx;width: 240upx;" class="nodetext">{{datas.address}}</view>
			</view>
		</view>
	</view>	
</template>

<script>
export default {
	props:{
		datas:'',
		lat:'',
		lng:''
	},
	data() {
		return {

		};
	},
	onLoad(options) {

	},
	methods: {
		tosquare(){
			uni.navigateTo({
				url:'/pages/WB/squareList?lat='+this.lat+'&lng='+this.lng+'&id='+this.datas.id
			})
		}
	}
}
</script>

<style scoped>
	.squareAddress{
		width: 30upx;
		height: 30upx;
	}
	.squareText{
		width: 100%;
		padding: 14upx;
	}
	.squareImg{
		width: 320upx;
		height: 320upx;
		display: block;
	}
	.squareItem{
		display: inline-block;
		background: #fff;
		border-radius: 10upx;
		overflow: hidden;
		box-shadow: 0 0 5px #ccc;
		width: 320upx;
		margin-right: 20upx;
		margin-left: 10upx;
	}
</style>
